package com.tencent.mm.opensdk.modelbiz;

import android.os.Bundle;
import android.util.Log;
import com.tencent.mm.opensdk.modelbase.BaseReq;

public final class JumpToBizWebview {
    public class Req extends BaseReq {
        private static final int EXT_MSG_LENGTH = 1024;
        private static final String TAG = "MicroMsg.SDK.JumpToBizWebview.Req";
        public String extMsg;
        public int scene;
        public String toUserName;
        public int webType;

        public Req() {

            this.scene = 1;
        }

        public boolean checkArgs() {
            boolean v0 = false;
            if(this.toUserName == null || this.toUserName.length() <= 0) {
                Log.e("MicroMsg.SDK.JumpToBizWebview.Req", "checkArgs fail, toUserName is invalid");
            }
            else {
                if(this.extMsg != null && this.extMsg.length() > 1024) {
                    Log.e("MicroMsg.SDK.JumpToBizWebview.Req", "ext msg is not null, while the length exceed 1024 bytes");
                    return v0;
                }

                v0 = true;
            }

            return v0;
        }

        public int getType() {
            return 8;
        }

        public void toBundle(Bundle arg3) {
            super.toBundle(arg3);
            arg3.putString("_wxapi_jump_to_biz_webview_req_to_user_name", this.toUserName);
            arg3.putString("_wxapi_jump_to_biz_webview_req_ext_msg", this.extMsg);
            arg3.putInt("_wxapi_jump_to_biz_webview_req_web_type", this.webType);
            arg3.putInt("_wxapi_jump_to_biz_webview_req_scene", this.scene);
        }
    }

    public JumpToBizWebview() {

    }
}

